package com.dmsdbj.itoo.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.dmsdbj.itoo.exception.ItooException;
import com.dmsdbj.itoo.exception.OnlineExamException;
import com.dmsdbj.itoo.facade.TbUseFacade;
import com.dmsdbj.itoo.resultvoutil.ResultVO;
import com.dmsdbj.itoo.resultvoutil.ResultVOUtil;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/tbuse")
public class TbUseController {

    @Reference
    TbUseFacade tbUseFacade;

    @GetMapping("/test/id/{id}")
    public ResultVO test(@PathVariable("id") long id) {

//        return tbUseFacade.findUserCount();
//        try {
            tbUseFacade.findUserCount();
//        } catch (OnlineExamException e) {
//            e.printStackTrace();
//            return ResultVOUtil.error(2222, e.getMessage());
//
//        } catch (ItooException e) {
//            e.printStackTrace();
//        } catch (Exception e) {
//            e.printStackTrace();
//            return ResultVOUtil.error(2222, e.getMessage());
//        }
        return null;
    }

}
